package com.sample.andremion.musicplayer.view;

import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;

/**
 * Created by G on 2016/7/9 0009.
 */

public class AsynLoadRecycleView extends RecyclerView {
    public static boolean isScroll = false;

    public AsynLoadRecycleView(Context context) {
        super(context);
    }

    public AsynLoadRecycleView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public AsynLoadRecycleView(Context context, @Nullable AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public void onScrollStateChanged(int state) {
        super.onScrollStateChanged(state);
        isScroll = state != 0;
        if (!isScroll)
        getAdapter().notifyDataSetChanged();
    }
}
